let bf1 = Buffer.from('10');
console.log(bf1);

//初始化缓冲区
//保证新创建的缓冲区数据不会包含旧缓冲区
let bf2 = Buffer.alloc(10)  //大小为10个字节
console.log(bf2);


//不会重置数据, 不安全
let bf3 = Buffer.allocUnsafe(10)
console.log(bf3);